const reducer = (state = 0, action:any) => {
  switch (action.type) {
    case 'setInfo':
      // 返回新的state
      return {
        ...action.payload
      }
    default:
      return state
  }
}
export default reducer